#!/usr/bin/python
#-*-coding:utf-8-*-

import time, datetime, unittest, cookielib
from base import *
from protocol import *
from httpDriver import *
import logConfig as log

# 执行测试的类
class interfaceSet_company(TestCase):
    def __init__(self, cpu):
        TestCase.__init__(self, cpu)
        self.cpu = cpu
        self.test_name = u"企业管理平台"
        self.test_version = 'v1.0'
        self.test_pl = 'web'
        self.test_net = 'wifi'
        self.serverIP = cpu["data"]._const["HTTP"]["HOST"]
        self.defaultServer = self.serverIP+'/company/'
        self.username = 'autoTest1'
        self.password = '123456'
        self.caseSet = [
            #####登录#####
            # >>>异常登录校验
            (
             #'interface_loginCheck_false_1','interface_loginCheck_false_2','interface_loginCheck_false_3','interface_loginCheck_false_4','interface_loginCheck_false_5','interface_loginCheck_false_6',
             #'interface_loginCheck_false_7','interface_loginCheck_false_8','interface_loginCheck_false_9','interface_loginCheck_false_10','interface_loginCheck_false_11','interface_loginCheck_false_12',
             #'interface_loginCheck_false_13','interface_loginCheck_false_14','interface_loginCheck_false_15','interface_loginCheck_false_16','interface_loginCheck_false_17','interface_loginCheck_false_18','interface_loginCheck_false_19',
             #>>>正常登录验证
             'interface_loginCheck_true',
             #'interface_getIndexPage'
            ),
            #####企业群组管理#####
            (
             #'interface_getGroupAddPage',
             #'interface_addGroup_false_1','interface_addGroup_false_2','interface_addGroup_false_3','interface_addGroup_false_4',#企业群组新增校验
             #'interface_addGroup_true',
             #'interface_getGroupEditPage',
             #'interface_editGroup_false_1', 'interface_editGroup_false_2', 'interface_editGroup_false_3', 'interface_editGroup_false_4',  #企业群组编辑校验
             #'interface_editGroup_true',
             #'interface_GroupDisable','interface_GroupEnable',
             #'interface_GroupDel',
            ),
            #####企业用户管理#####
            (
             #'interface_getUserAddPage',
             #'interface_addUser_false_1','interface_addUser_false_2','interface_addUser_false_3','interface_addUser_false_4',#企业用户新增校验(预测结果为0，测试结果为-1)
             #'interface_addUser_true',
             #'interface_getUserEditPage',
             #'interface_editUser_baseInfo_false_1','interface_editUser_baseInfo_false_2','interface_editUser_baseInfo_false_3','interface_editUser_baseInfo_false_4','interface_editUser_baseInfo_true',
             #'interface_editUser_power_true','interface_editUser_groupEdit_true','interface_editUser_organize_true',
             #'interface_UserDisable','interface_UserEnable','interface_UserPwdReset',
             #'interface_UserDel',
            ),
            #企业管理员管理校验 缺失
            (
             #'interface_getAdminAddPage',
             #'interface_addAdmin_false_1','interface_addAdmin_false_2','interface_addAdmin_false_3',#（管理员账号未校验）
             #'interface_addAdmin_false_4',#（已经占用的管理员能新增）
             #'interface_addAdmin_false_5','interface_addAdmin_false_6','interface_addAdmin_false_7',#企业管理员新增校验（管理账号未校验）
             #'interface_addAdmin_false_8',#（管理账号未校验）
             #'interface_addAdmin_false_9','interface_addAdmin_false_10',
             #'interface_addAdmin_false_11','interface_addAdmin_false_12','interface_addAdmin_false_13',
             'interface_addAdmin_true',
             #'interface_getAdminEditPage',
             #'interface_editAdmin_false_1','interface_editAdmin_false_2','interface_editAdmin_false_3','interface_editAdmin_false_4','interface_editAdmin_false_5','interface_editAdmin_false_6','interface_editAdmin_false_7',#企业管理员编辑校验
             #'interface_editAdmin_false_8','interface_editAdmin_false_9','interface_editAdmin_false_10','interface_editAdmin_false_11','interface_editAdmin_false_12','interface_editAdmin_false_13',#企业管理员编辑校验
             #'interface_editAdmin_true',
             #'interface_AdminDisable','interface_AdminEnable','interface_AdminPwdReset',
             #'interface_AdminDel',
            ),
            (
             #'interface_loginOut',
            )
        ]
        self.editGroupId = ''
        self.editUserId = ''
        self.editAdminId = ''
        self.execTest()

    def outputPass(self,module,funcInfo,serial,method,url,data,expectResult,testResult):
        log.TestLog('=======================================', 'T')
        log.TestLog('PASS:         ' + module + '>>>' + funcInfo + '\t' + sys._getframe().f_code.co_name + '  (' + __name__ + ')', 'T')
        log.TestLog('----------------------------------------------------------------------', 'T')
        log.TestLog('RESULT:     ' + testResult, 'T')
        log.TestLog('USETIME:   ' + '%.3f seconds' % self.useTime, 'T')
        log.TestLog('----------------------------------------------------------------------', 'T')
        self.cpu["data"].testReportAppend(serial, funcInfo, method, url, str(data), expectResult, testResult, 'success')

    def outputFail(self,module,funcInfo,serial,method,url,data,expectResult,testResult):
        log.TestLog('=======================================', 'F')
        log.TestLog('FAIL:          ' + module + '>>>' + funcInfo + '\t' + sys._getframe().f_code.co_name + "  (" + __name__ + ")", 'F')
        log.TestLog('----------------------------------------------------------------------', 'F')
        log.TestLog('RESULT:     ' + testResult, 'F')
        log.TestLog('USETIME:   ' + '%.3f seconds' % self.useTime, 'F')
        log.TestLog('----------------------------------------------------------------------', 'F')
        self.cpu["data"].testReportAppend(serial, funcInfo, method, url, str(data), expectResult, testResult, 'fail')

    # 登录> 1.1 账号为空"",密码为"123456"
    def interface_loginCheck_false_1(self):
        module         = u'登录'
        func           = u'账号为空"",密码为"123456"'
        serial         = '1.1'
        funcInfo       = serial+'.'+func
        method         = 'POST'
        url            = 'http://'+self.serverIP+'/company/login.do'
        data           = {'adminCode': '', 'password': '123456'}
        expectResult   = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response       = self.assertEqual(PyUnit_FormPost(url,data), expectResult)
        self.endTime   = time.time()
        self.useTime   = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常', u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈', u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version, u'范训山', u'Linyy')

    # 登录> 1.2 账号为空"",密码为"123"
    def interface_loginCheck_false_2(self):
        module = u'登录'
        func = u'账号为空"",密码为"123"'
        serial = '1.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': '', 'password': '123'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.3 账号中有特殊字符"!@#$%^&*()",密码为"123456"
    def interface_loginCheck_false_3(self):
        module = u'登录'
        func = u'账号中有特殊字符"!@#$%^&*()",密码为"123456"'
        serial = '1.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': '!@#$%^&*()', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.4 账号前有空格" autoTest1",密码为"123456"
    def interface_loginCheck_false_4(self):
        module = u'登录'
        func = u'账号前有空格" autoTest1",密码为"123456"'
        serial = '1.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': ' autoTest1', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.5 正确账号中间有空格"autoT est1",密码为"123456"
    def interface_loginCheck_false_5(self):
        module = u'登录'
        func = u'正确账号中间有空格"autoT est1",密码为"123456"'
        serial = '1.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoT est1', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.6 正确账号后有空格"autoTest1 ",密码为"123456"
    def interface_loginCheck_false_6(self):
        module = u'登录'
        func = u'正确账号后有空格"autoTest1 ",密码为"123456"'
        serial = '1.6'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1 ', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.7 错误的账号登录，账号为"aoTest",密码为"123456"
    def interface_loginCheck_false_7(self):
        module = u'登录'
        func = u'错误的账号登录，账号为"aoTest",密码为"123456"'
        serial = '1.7'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'aoTest', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.8 长度小于6的账号登录，账号为"aoT",密码为"123456"
    def interface_loginCheck_false_8(self):
        module = u'登录'
        func = u'长度小于6的账号登录，账号为"aoT",密码为"123456"'
        serial = '1.8'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'aoT', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.9 长度大于12的账号登录，账号为"autoTest11111111",密码为"123456"
    def interface_loginCheck_false_9(self):
        module = u'登录'
        func = u'长度大于12的账号登录，账号为"autoTest11111111",密码为"123456"'
        serial = '1.9'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest11111111', 'password': '123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.10 正确账号"autoTest1",密码为空""
    def interface_loginCheck_false_10(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码为空""'
        serial = '1.10'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': ''}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.11 正确账号"autoTest1",密码中有特殊字符,密码为"!@#$%^&*()"
    def interface_loginCheck_false_11(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码为空"!@#$%^&*()"'
        serial = '1.11'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '!@#$%^&*()'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.12 正确账号"autoTest1",密码前有空格,密码为" 123456"
    def interface_loginCheck_false_12(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码为空" 123456"'
        serial = '1.12'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': ' 123456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.13 正确账号"autoTest1",密码中间有空格,密码为"123 456"
    def interface_loginCheck_false_13(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码中间有空格,密码为"123 456"'
        serial = '1.13'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '123 456'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.14 正确账号"autoTest1",密码后有空格,密码为"123456 "
    def interface_loginCheck_false_14(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码后有空格,密码为"123456 "'
        serial = '1.14'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '123456 '}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.15 正确账号"autoTest1",错误的密码"654321"
    def interface_loginCheck_false_15(self):
        module = u'登录'
        func = u'正确账号"autoTest1",错误的密码"654321"'
        serial = '1.15'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '654321 '}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.16 正确账号"autoTest1",密码长度小于3位,密码为"1"
    def interface_loginCheck_false_16(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码长度小于3位,密码为"1"'
        serial = '1.16'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '1'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.17 正确账号"autoTest1",密码长度大于12位,密码为"123456789123456789"
    def interface_loginCheck_false_17(self):
        module = u'登录'
        func = u'正确账号"autoTest1",密码长度大于12位,密码为"123456789123456789"'
        serial = '1.17'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '123456789123456789'}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.18 账号和密码均为空
    def interface_loginCheck_false_18(self):
        module = u'登录'
        func = u'账号和密码均为空'
        serial = '1.18'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': '', 'password': ''}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.19 禁用的账号登录,未完成
    def interface_loginCheck_false_19(self):
        module = u'登录'
        func = u'禁用的账号登录,未完成'
        serial = '1.19'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': '', 'password': ''}
        expectResult = 0

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 1.20 正确账号和密码登录，账号为"autoTest1",密码为"123456"
    def interface_loginCheck_true(self):
        module = u'登录'
        func = u'正确账号和密码登录，账号为"autoTest1",密码为"123456"'
        serial = '1.20'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/login.do'
        data = {'adminCode': 'autoTest1', 'password': '123456'}
        expectResult = 100

        self.startTime = time.time()
        self.cookies = cookielib.CookieJar()
        self.cookies.set_cookie(make_cookie("fnRemeberAdminCode", "true", self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminCode", self.username, self.defaultServer))
        self.cookies.set_cookie(make_cookie("fnAdminPassword", self.password, self.defaultServer))
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cookies))
        urllib2.install_opener(opener)

        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 2.主页面获取
    def interface_getIndexPage(self):
        module         = u'登录'
        func           = u'主页面获取'
        serial         = '2.1'
        funcInfo       = serial+'.'+func
        method         = 'GET'
        url            = 'http://'+self.serverIP+'/company/index.do?timeStamp='+str(getTimestamp())
        data           = {}
        expectResult   = 100

        self.startTime = time.time()
        response       = self.assertEqual(PyUnit_PageGet(url,data), expectResult)
        self.endTime   = time.time()
        self.useTime   = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 登录> 3.退出登录
    def interface_getLoginPage(self):
        module         = u'登录'
        func           = u'退出登录'
        serial         = '3.1'
        funcInfo       = serial+'.'+func
        method         = 'GET'
        url            = 'http://'+self.serverIP+'/company/logout.do'
        data           = {}
        expectResult   = 100

        self.startTime = time.time()
        response       = self.assertEqual(PyUnit_PageGet(url,data), expectResult)
        self.endTime   = time.time()
        self.useTime   = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 1.获取群组添加页面
    def interface_getGroupAddPage(self):
        module         = u'企业群组管理'
        func           = u'获取群组添加页面'
        serial         = '2.1'
        funcInfo       = serial+'.'+func
        method         = 'GET'
        url            = 'http://'+self.serverIP+'/company/companyGroupAddPage.do?timeStamp='+str(getTimestamp())
        data           = {}
        expectResult   = 100

        self.startTime = time.time()
        response       = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime   = time.time()
        self.useTime   = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 2.1 添加群组,群组名称为空
    def interface_addGroup_false_1(self):
        module = u'企业群组管理'
        func = u'添加群组,群组名称为空'
        serial = '2.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupAddPage_companyGroupAdd.do'
        data = {"groupName":"","status":1}
        expectResult = 0

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        self.editGroupId = jsonAck["data"]
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 2.2 添加群组,群组名称长度大于8,群组名称为"testGroupName"
    def interface_addGroup_false_2(self):
        module = u'企业群组管理'
        func = u'添加群组,群组名称长度大于8,群组名称为"testGroupName"'
        serial = '2.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupAddPage_companyGroupAdd.do'
        data = {"groupName": "testGroupName","status":1}
        expectResult = 0

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        self.editGroupId = jsonAck["data"]
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 2.3 添加群组,群组名称为空格,群组名称为"      "
    def interface_addGroup_false_3(self):
        module = u'企业群组管理'
        func = u'添加群组,群组名称为空格,群组名称为"      "'
        serial = '2.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupAddPage_companyGroupAdd.do'
        data = {"groupName": "      ","status":1}
        expectResult = 0

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 2.4 添加群组,群组名称为特殊字符,群组名称为"!@#$%^"
    def interface_addGroup_false_4(self):
        module = u'企业群组管理'
        func = u'添加群组,群组名称为特殊字符,群组名称为"!@#$%^"'
        serial = '2.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupAddPage_companyGroupAdd.do'
        data = {"groupName": "!@#$%^", "status": 1}
        expectResult = 0

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 2.5 添加群组,群组名称为"TGroup"
    def interface_addGroup_true(self):
        module = u'企业群组管理'
        func = u'添加群组,群组名称为"TGroup"'
        serial = '2.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupAddPage_companyGroupAdd.do'
        data = {"groupName": 'TGroup',"status":1}
        expectResult = 100

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        self.editGroupId = jsonAck["data"]
        print("The add UserId: "+self.editUserId)
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 3 获取群组编辑界面
    def interface_getGroupEditPage(self):
        module = u'企业群组管理'
        func = u'获取群组编辑界面'
        serial = '3.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage.do?timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 4.1 群组编辑校验,群组名称不能为空,将群组名称从TGroup改为""
    def interface_editGroup_false_1(self):
        module = u'企业群组管理'
        func = u'群组编辑校验,群组名称不能为空,将群组名称从TGroup改为""'
        serial = '4.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage_companyGroupEdit.do'
        data = {"groupId": self.editGroupId, "groupName": ""}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 4.2 群组编辑,群组名称长度大于8,将群组名称从TGroup改为"testGroupName"
    def interface_editGroup_false_2(self):
        module = u'企业群组管理'
        func = u'群组编辑,群组名称长度大于8,将群组名称从TGroup改为"testGroupName"'
        serial = '4.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage_companyGroupEdit.do'
        data = {"groupId": self.editGroupId, "groupName": "testGroupName"}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 4.3 群组编辑,群组名称为空格,将群组名称从TGroup改为"      "
    def interface_editGroup_false_3(self):
        module = u'企业群组管理'
        func = u'群组编辑,群组名称为空格,将群组名称从TGroup改为"      "'
        serial = '4.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage_companyGroupEdit.do'
        data = {"groupId": self.editGroupId, "groupName": "      "}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 4.4 群组编辑,群组名称含有特殊字符,将群组名称从TGroup改为"!@#$%^"
    def interface_editGroup_false_4(self):
        module = u'企业群组管理'
        func = u'群组编辑,群组名称含有特殊字符,将群组名称从TGroup改为"!@#$%^"'
        serial = '4.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage_companyGroupEdit.do'
        data = {"groupId": self.editGroupId, "groupName": "!@#$%^"}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 4.5 群组编辑,将群组名称从TGroup改为NGroup
    def interface_editGroup_true(self):
        module = u'企业群组管理'
        func = u'群组编辑,将群组名称从TGroup改为NGroup'
        serial = '4.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        groupName = 'NGroup'
        url = 'http://' + self.serverIP + '/company/companyGroupEditPage_companyGroupEdit.do'
        data = {"groupId":self.editGroupId,"groupName": groupName}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 5.1 群组启用禁用，将群组NGroup禁用
    def interface_GroupDisable(self):
        module = u'企业群组管理'
        func = u'群组禁用，将群组NGroup禁用'
        serial = '5.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyGroupStatusChange.do?id='+str(self.editGroupId)+'&status=0&timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 5.2 群组启用禁用，将群组NGroup启用
    def interface_GroupEnable(self):
        module = u'企业群组管理'
        func = u'群组启用，将群组NGroup启用'
        serial = '5.2'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyGroupStatusChange.do?id=' + str(self.editGroupId) + '&status=1&timeStamp=' + str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业群组管理> 6 群组删除,删除群组NGroup
    def interface_GroupDel(self):
        module = u'企业群组管理'
        func = u'群组删除,删除群组NGroup'
        serial = '6.1'
        funcInfo = serial + '.' + func
        method = 'DELETE'
        url = 'http://' + self.serverIP + '/company/companyGroupDel.do?id=' + str(self.editGroupId)
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormDelete(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 1 获取企业用户增加界面
    def interface_getUserAddPage(self):
        module = u'企业用户管理'
        func = u'获取企业用户增加界面'
        serial = '1.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage.do?timeStamp=' + str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 2.1 企业用户增加的name校验,name的为空
    def interface_addUserCodeCheck_false_1(self):
        module = u'企业用户管理'
        func = u'企业用户增加的name校验,name的为空'
        serial = '2.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberCodeCHk.do'
        data = {"userCode": ''}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 2.2 企业用户增加的name校验,name的长度大于8个字符，name为"999999999"
    def interface_addUserCodeCheck_false_2(self):
        module = u'企业用户管理'
        func = u'企业用户增加的name校验,name的长度大于8个字符，name为"999999999"'
        serial = '2.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberCodeCHk.do'
        data = {"userCode": '999999999'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 2.3 企业用户增加的name校验,name含有特殊字符，name为"!@#$%^&*"
    def interface_addUserCodeCheck_false_3(self):
        module = u'企业用户管理'
        func = u'企业用户增加的name校验,name含有特殊字符，name为"!@#$%^&*"'
        serial = '2.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberCodeCHk.do'
        data = {"userCode": '!@#$%^&*'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 2.4 企业用户增加的name校验,name含有空格，name为"test group"
    def interface_addUserCodeCheck_false_4(self):
        module = u'企业用户管理'
        func = u'企业用户增加的name校验,name含有空格，name为"test group"'
        serial = '2.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberCodeCHk.do'
        data = {"userCode": 'test group'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 2.5 企业用户增加的name校验,正确的name校验,name为"testUser"
    def interface_addUserCodeCheck_true(self):
        module = u'企业用户管理'
        func = u'企业用户增加的name校验,正确的name校验,name为"testUser"'
        serial = '2.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberCodeCHk.do'
        data = {"userCode": 'testUser'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 3.1 企业用户增加的Imei校验.imei号为空
    def interface_addUserImeiCheck_false_1(self):
        module = u'企业用户管理'
        func = u'企业用户增加的Imei校验.imei号为空'
        serial = '3.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberImeiCHk.do'
        data = {"imei": ''}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 3.2 企业用户增加的Imei校验.imei号长度小于3,imei号为"12"
    def interface_addUserImeiCheck_false_2(self):
        module = u'企业用户管理'
        func = u'企业用户增加的Imei校验.imei号长度小于3,imei号为"12"'
        serial = '3.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberImeiCHk.do'
        data = {"imei": '12'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 3.3 企业用户增加的Imei校验.imei号长度大于15,imei号为"123456789123456789"
    def interface_addUserImeiCheck_false_3(self):
        module = u'企业用户管理'
        func = u'企业用户增加的Imei校验.imei号长度大于15,imei号为"123456789123456789"'
        serial = '3.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberImeiCHk.do'
        data = {"imei": '123456789123456789'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 3.4 企业用户增加的Imei校验.imei号被占用,imei号为"358740055952484"
    def interface_addUserImeiCheck_false_4(self):
        module = u'企业用户管理'
        func = u'企业用户增加的Imei校验.imei号被占用,imei号为"358740055952484"'
        serial = '3.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberImeiCHk.do'
        data = {"imei": '123456789123456789'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 3.5 企业用户增加的Imei校验,正常的imei校验,imei号为"518740055952484"
    def interface_addUserImeiCheck_true(self):
        module = u'企业用户管理'
        func = u'企业用户增加的Imei校验,正常的imei校验,imei号为"518740055952484"'
        serial = '3.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberImeiCHk.do'
        data = {"imei": '518740055952484'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 4.1 企业用户增加,用户名称为空,新增用户的userName为""
    def interface_addUser_false_1(self):
        module = u'企业用户管理'
        func = u'企业用户增加,用户名称为空,新增用户的userName为""'
        serial = '4.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberAdd.do'
        data    = {"userCode": 'aoTest15000', 'userName': '', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 4.2 企业用户增加,用户名称长度大于8,用户名称为"testUserName"
    def interface_addUser_false_2(self):
        module = u'企业用户管理'
        func = u'企业用户增加,用户名称长度大于8,用户名称为"testUserName"'
        serial = '4.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberAdd.do'
        data    = {"userCode": 'aoTest15000', 'userName': 'testUserName', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 4.3 企业用户增加,用户名称中有特殊字符,用户名称为"!@#$%^"
    def interface_addUser_false_3(self):
        module = u'企业用户管理'
        func = u'企业用户增加,用户名称中有特殊字符,用户名称为"!@#$%^"'
        serial = '4.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberAdd.do'
        data    = {"userCode": 'aoTest15000', 'userName': '!@#$%^', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 4.4 企业用户增加,用户名称为空格,用户名称为"      "
    def interface_addUser_false_4(self):
        module = u'企业用户管理'
        func = u'企业用户增加,用户名称为空格,用户名称为"      "'
        serial = '4.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberAdd.do'
        data    = {"userCode": 'aoTest15000', 'userName': '        ', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 4.5 企业用户增加,新增用户的userCode为"aoTest15000",用户名称为"testUser"
    def interface_addUser_true(self):
        module = u'企业用户管理'
        func = u'企业用户增加,新增用户的userCode为"aoTest15000",用户名称为"testUser"'
        serial = '4.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberAdd.do'
        data    = {"userCode": 'aoTest15000', 'userName': 'testUser', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 100

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        print str(jsonAck).encode("utf-8")
        self.editUserId = jsonAck["data"]["userId"]
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 5 企业用户编辑页面获取,用户的userCode为"aoTest15000"
    def interface_getUserEditPage(self):
        module = u'企业用户管理'
        func = u'企业用户编辑页面获取,用户的userCode为"aoTest15000"'
        serial = '5.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyMemberEditPage.do?timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1.1 企业用户编辑 > 企业用户编辑——基本信息 > 用户姓名为空
    def interface_editUser_baseInfo_false_1(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——基本信息 > 用户姓名为空'
        serial = '6.1.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_baseInfoById.do'
        data = {"userId":self.editUserId,"userName":"","groupIds":groupArraySting,"level":"100","remark":"12",}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1.2 企业用户编辑 > 企业用户编辑——基本信息 > 用户姓名长度大于8，姓名为"testUserName"
    def interface_editUser_baseInfo_false_2(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——基本信息 > 用户姓名长度大于8，姓名为"testUserName"'
        serial = '6.1.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData(
            'http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()),
            {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_baseInfoById.do'
        data = {"userId": self.editUserId, "userName": "testUserName", "groupIds": groupArraySting, "level": "100",
                "remark": "12", }
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1.3 企业用户编辑 > 企业用户编辑——基本信息 > 用户姓名为特殊字符，姓名为"!@#$%^&*"
    def interface_editUser_baseInfo_false_3(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——基本信息 > 用户姓名为特殊字符，姓名为"!@#$%^&*"'
        serial = '6.1.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData(
            'http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()),
            {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_baseInfoById.do'
        data = {"userId": self.editUserId, "userName": "!@#$%^&*", "groupIds": groupArraySting, "level": "100",
                "remark": "12", }
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1.4 企业用户编辑 > 企业用户编辑——基本信息 > 用户姓名为空格，姓名为"        "
    def interface_editUser_baseInfo_false_4(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——基本信息 > 用户姓名为空格，姓名为"        "'
        serial = '6.1.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData(
            'http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()),
            {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_baseInfoById.do'
        data = {"userId": self.editUserId, "userName": "        ", "groupIds": groupArraySting, "level": "100",
                "remark": "12", }
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1.5 企业用户编辑 > 企业用户编辑——基本信息 > 用户姓名为"测试用户1"
    def interface_editUser_baseInfo_true(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——基本信息 > 用户姓名为"测试用户1"'
        serial = '6.1.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData(
            'http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()),
            {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_baseInfoById.do'
        data = {"userId": self.editUserId, "userName": "测试用户1", "groupIds": groupArraySting, "level": "100",
                "remark": "12", }
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.2 企业用户编辑 > 企业用户编辑——权限
    def interface_editUser_power_true(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——权限'
        serial = '6.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_powerById.do'
        data = {"userId": self.editUserId, 'permissions': '{5},{4},{3},{2},{1}'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.3 企业用户编辑 > 企业用户编辑——群组
    def interface_editUser_groupEdit_true(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——群组'
        serial = '6.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)
        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_groupById.do'
        data = {"userId": self.editUserId, 'groupIds': groupArraySting}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.4 企业用户编辑 > 企业用户编辑——组织架构
    def interface_editUser_organize_true(self):
        module = u'企业用户管理'
        func = u'企业用户编辑——组织架构'
        serial = '6.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")
        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_organizeById.do'
        data = {"userId": self.editUserId, 'departmentId': departmentId}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.1 企业用户编辑,用户名称改为空
    def interface_editUser_false_1(self):
        module = u'企业用户管理'
        func = u'企业用户编辑,用户名称改为空'
        serial = '6.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_companyMemberEdit.do'
        data    = {'userId': self.editUserId, "userCode": 'aoTest15000', 'userName': '', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.2 企业用户编辑,用户名称长度大于8,用户名称改为"testUserName2"
    def interface_editUser_false_2(self):
        module = u'企业用户管理'
        func = u'企业用户编辑,用户名称长度大于8,用户名称改为"testUserName2"'
        serial = '6.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        print u"企业用户编辑"
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_companyMemberEdit.do'
        data    = {'userId': self.editUserId, "userCode": 'aoTest15000', 'userName': 'testUserName2', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 6.3 企业用户编辑,用户名称从"testUser"改为"testUse2"
    def interface_editUser_true(self):
        module = u'企业用户管理'
        func = u'企业用户编辑,用户名称从"testUser"改为"testUse2"'
        serial = '6.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        defaultGroup = 0
        groupArraySting = ""
        print u"企业用户编辑"
        response = FormHttpGet_returnData('http://' + self.serverIP + '/company/companyGroupEditPage_query.do?timeStamp=' + str(getTimestamp()), {})
        if response["status"] == 100:
            data = response["data"]
            groupArray = []
            for group in data:
                if defaultGroup == 0:
                    defaultGroup = group["groupId"]
                groupArray.append(str(group["groupId"]))
            groupArraySting = ",".join(groupArray)

        response = FormHttpPostFirst_returnData('http://' + self.serverIP + '/company/companyMemberAddPage_organizeTree.do',{})
        departmentId = response["data"][0]["id"]
        departmentName = response["data"][0]["name"].encode("utf-8")

        url = 'http://' + self.serverIP + '/company/companyMemberEditPage_companyMemberEdit.do'
        data    = {'userId': self.editUserId, "userCode": 'aoTest15000', 'userName': 'testUse2', 'userType': '2', 'sex': '0', 'imei': '358740055935935','mobile': '18758038709', 'status': '1', 'groupIds': groupArraySting, 'defaultGroupId': defaultGroup, 'level':'100', 'permissions': '{5},{4},{3},{2},{1}',"departmentId":departmentId,"departmentName":departmentName}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 7.1 企业用户禁用,用户的userCode为"aoTest15000"
    def interface_UserDisable(self):
        module = u'企业用户管理'
        func = u'企业用户禁用,用户的userCode为"aoTest15000"'
        serial = '7.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyMemberStatusChange.do?id='+str(self.editUserId)+'&status=0&timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 7.2 企业用户启用,用户的userCode为"aoTest15000"
    def interface_UserEnable(self):
        module = u'企业用户管理'
        func = u'企业用户启用,用户的userCode为"aoTest15000"'
        serial = '7.2'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyMemberStatusChange.do?id=' + str(self.editUserId) + '&status=1&timeStamp=' + str(
            getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 8 企业用户重置密码,用户的userCode为"aoTest15000"
    def interface_UserPwdReset(self):
        module = u'企业用户管理'
        func = u'企业用户重置密码,用户的userCode为"aoTest15000"'
        serial = '8.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyMemberAddPage_companyMemberPasswordReset.do?id='+str(self.editUserId)+'&timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)

        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业用户管理> 9 企业用户删除,用户的userCode为"aoTest15000"
    def interface_UserDel(self):
        module = u'企业用户管理'
        func = u'企业用户删除,用户的userCode为"aoTest15000"'
        serial = '9.1'
        funcInfo = serial + '.' + func
        method = 'DELETE'
        url = 'http://' + self.serverIP + '/company/companyMemberDel.do?id='+str(self.editUserId)
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormDelete(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 1 企业管理员增加界面获取
    def interface_getAdminAddPage(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加界面'
        serial = '1.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage.do?timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.1 企业管理员增加校验,管理员账号为空
    def interface_addAdminCheck_false_1(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员账号为空'
        serial = '2.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": ''}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.2 企业管理员增加校验,管理员账号长度小于6位"testM"
    def interface_addAdminCheck_false_2(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员账号长度小于6位"testM"'
        serial = '2.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": 'testM'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.3 企业管理员增加校验,管理员账号长度大于12位"testManager123456"
    def interface_addAdminCheck_false_3(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员账号长度大于12位"testManager123456"'
        serial = '2.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": 'testManager123456'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.4 企业管理员增加校验,管理员账号中有空格"test Manager"
    def interface_addAdminCheck_false_4(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员账号中有空格"test Manager"'
        serial = '2.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": 'test Manager'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.5 企业管理员增加校验,管理员账号中有特殊字符"!@#$%^&*()"
    def interface_addAdminCheck_false_5(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员账号中有特殊字符"!@#$%^&*()"'
        serial = '2.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": '!@#$%^&*()'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.6 企业管理员增加校验,管理员名称为空
    def interface_addAdminCheck_false_6(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员名称为空'
        serial = '2.6'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminName": ''}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.7 企业管理员增加校验,管理员名称长度大于12位"ManagerName12345678"
    def interface_addAdminCheck_false_7(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,管理员名称长度大于12位"ManagerName12345678"'
        serial = '2.7'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminName": 'ManagerName12345678'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.8 企业管理员增加校验,手机号码为空
    def interface_addAdminCheck_false_8(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,手机号码为空'
        serial = '2.8'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"mobile": ''}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.9 企业管理员增加校验,手机号码不合法"1875803870"
    def interface_addAdminCheck_false_9(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,手机号码不合法'
        serial = '2.9'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"mobile": '1875803870'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.10 企业管理员增加校验,正确的管理员账号"adminCTest"
    def interface_addAdminCheck_true_1(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,正确的管理员账号"adminCTest"'
        serial = '2.10'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminCode": 'adminCTest'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.11 企业管理员增加校验,正确的管理员名称"adminNameTest"
    def interface_addAdminCheck_true_2(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,正确的管理员名称"adminNameTest"'
        serial = '2.11'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"adminName": 'adminNameTest'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 2.12 企业管理员增加校验,正确的手机号码"18758038709"
    def interface_addAdminCheck_true_3(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加校验,正确的手机号码"18758038709"'
        serial = '2.12'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminCodeCHk.do'
        data = {"mobile": '18758038709'}
        expectResult = 120

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPostCheck(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.1 企业管理员增加,管理员账号为空
    def interface_addAdmin_false_1(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号为空'
        serial = '3.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": '', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.2 企业管理员增加,管理员账号为长度小于6,为"testA"
    def interface_addAdmin_false_2(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号为长度小于6,为"testA"'
        serial = '3.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'testA', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.3 企业管理员增加,管理员账号为长度大于12,为"testadminTest"
    def interface_addAdmin_false_3(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号为长度大于12,为"testadminTest"'
        serial = '3.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'testadminTest', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.4 企业管理员增加,管理员账号被占用,账号为"autoTest1"
    def interface_addAdmin_false_4(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号账号被占用,账号为"autoTest1"'
        serial = '3.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'autoTest1', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.5 企业管理员增加,管理员账号中有特殊字符,账号为"!@#$%^&*"
    def interface_addAdmin_false_5(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号中有特殊字符,账号为"!@#$%^&*"'
        serial = '3.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": '!@#$%^&*', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.6 企业管理员增加,管理员账号位空格,账号为"        "
    def interface_addAdmin_false_6(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号位空格,账号为"        "'
        serial = '3.6'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": '        ', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.7 企业管理员增加,管理员名称为空
    def interface_addAdmin_false_7(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员名称为空'
        serial = '3.7'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': '', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.8 企业管理员增加,管理员名称长度大于12,名称为"testAdminName"
    def interface_addAdmin_false_8(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员名称长度大于12,名称为"testAdminName"'
        serial = '3.8'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': 'testAdminName', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.9 企业管理员增加,管理员名称中有特殊字符,名称为"!@#$%^&*"
    def interface_addAdmin_false_9(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员名称中有特殊字符,名称为"!@#$%^&*"'
        serial = '3.9'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': '!@#$%^&*', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.10 企业管理员增加,管理员名称为空格,名称为"        "
    def interface_addAdmin_false_10(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员名称为空格,名称为"        "'
        serial = '3.10'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': '        ', 'mobile': '18758038709', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.11 企业管理员增加,管理员手机号为空
    def interface_addAdmin_false_11(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员手机号为空'
        serial = '3.11'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': 'adminName', 'mobile': '', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.12 企业管理员增加,管理员手机号长度小于11为"1875803870"
    def interface_addAdmin_false_12(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员手机号少于11位为"1875803870"'
        serial = '3.12'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': 'adminName', 'mobile': '1875803870', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.13 企业管理员增加,管理员手机号长度大于13为"187580387091"
    def interface_addAdmin_false_13(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员手机号长度大于13为"187580387091"'
        serial = '3.13'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': 'adminName', 'mobile': '187580387091', 'status': '1',
                'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 3.14 企业管理员增加,管理员账号"adminCTest",名称为"adminName"
    def interface_addAdmin_true(self):
        module = u'企业管理员管理'
        func = u'企业管理员增加,管理员账号"adminCTest",名称为"adminName"'
        serial = '3.14'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminAdd.do'
        data = {"adminCode": 'adminCTest', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1', 'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 100

        self.startTime = time.time()
        jsonAck = PyUnit_FormPost_AckJson(url, data)
        self.editAdminId = jsonAck["data"]
        response = self.assertEqual(jsonAck["status"], expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 4 企业管理员编辑页面获取,管理员账号"adminCTest"
    def interface_getAdminEditPage(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑页面获取,管理员账号"adminCTest"'
        serial = '4.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage.do?timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.1 企业管理员编辑校验,管理员账号改为空
    def interface_editAdmin_false_1(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号改为空'
        serial = '5.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': '', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.2 企业管理员编辑校验,管理员账号长度小于6,为"testA"
    def interface_editAdmin_false_2(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号长度小于6,为"testA"'
        serial = '5.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'testA', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.3 企业管理员编辑校验,管理员账号长度大于12,为"testAdminCode"
    def interface_editAdmin_false_3(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号长度大于12,为"testAdminCode"'
        serial = '5.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'testAdminCode', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.4 企业管理员编辑校验,管理员账号已被占用为"autoTest1"
    def interface_editAdmin_false_4(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号已被占用为"autoTest1"'
        serial = '5.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'autoTest1', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.5 企业管理员编辑校验,管理员账号中有特殊字符,账号为"!@#$%^&*"
    def interface_editAdmin_false_5(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号中有特殊字符,账号为"!@#$%^&*"'
        serial = '5.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': '!@#$%^&*', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.6 企业管理员编辑校验,管理员账号为空格,账号为"        "
    def interface_editAdmin_false_6(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员账号为空格,账号为"        "'
        serial = '5.6'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': '        ', "adminName": 'adminNameEdit',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.7 企业管理员编辑校验,管理员名称为空
    def interface_editAdmin_false_7(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员名称为空'
        serial = '5.7'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": '',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.8 企业管理员编辑校验,管理员名称长度大于12,名称为"testAdminName"
    def interface_editAdmin_false_8(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员名称长度大于12,名称为"testAdminName"'
        serial = '5.8'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": 'testAdminName',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.9 企业管理员编辑校验,管理员名称中有特殊字符,名称为"!@#$%^&*"
    def interface_editAdmin_false_9(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员名称中有特殊字符,名称为"!@#$%^&*"'
        serial = '5.9'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": '!@#$%^&*',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.10 企业管理员编辑校验,管理员名称为空"        "
    def interface_editAdmin_false_10(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员名称为空"        "'
        serial = '5.10'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": '        ',
                'mobile': '18758038709', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.11 企业管理员编辑校验,管理员手机号为空
    def interface_editAdmin_false_11(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员手机号为空'
        serial = '5.11'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": 'adminNameEdit',
                'mobile': '', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.12 企业管理员编辑校验,管理员手机号长度小于11,为"1875803870"
    def interface_editAdmin_false_12(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员手机号长度小于11,为"1875803870"'
        serial = '5.12'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": 'adminNameEdit',
                'mobile': '1875803870', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.13 企业管理员编辑校验,管理员手机号长度大于11,为"187580387091"
    def interface_editAdmin_false_13(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑校验,管理员手机号长度大于11,为"187580387091"'
        serial = '5.13'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, 'adminCode': 'adminCTest', "adminName": 'adminNameEdit',
                'mobile': '187580387091', 'status': '0', 'permissions': '1,2,3,4,5,6,7,8,9', 'levels': '2'}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 5.14 企业管理员编辑,管理员账号"范训山2"
    def interface_editAdmin_true(self):
        module = u'企业管理员管理'
        func = u'企业管理员编辑,管理员账号"范训山2"'
        serial = '5.14'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminEditPage_companyAdminEdit.do'
        data = {"adminId": self.editAdminId, "adminCode": 'adminCTest', "adminName": '范训山2', 'mobile': '18758038709','permissions': '1,2,3,4,5,6,7,8,9','levels':'2'}
        #{"adminCode": 'adminCTest', 'adminName': 'adminName', 'mobile': '18758038709', 'status': '1', 'permissions': '1,2,3,4,5,6,7,8,9'}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 6.1 企业管理员禁用,管理员账号"adminCTest"
    def interface_AdminDisable(self):
        module = u'企业管理员管理'
        func = u'企业管理员禁用,管理员账号"adminCTest"'
        serial = '6.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminStatusChange.do?id='+str(self.editAdminId)+'&status=0&timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 6.2 企业管理员启用,管理员账号"adminCTest"
    def interface_AdminEnable(self):
        module = u'企业管理员管理'
        func = u'企业管理员启用,管理员账号"adminCTest"'
        serial = '6.2'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminStatusChange.do?id=' + str(self.editAdminId) + '&status=1&timeStamp=' + str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 7 企业管理员密码重置,管理员账号"adminCTest"
    def interface_AdminPwdReset(self):
        module = u'企业管理员管理'
        func = u'企业管理员密码重置,管理员账号"adminCTest"'
        serial = '7.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminAddPage_companyAdminPasswordReset.do?id='+str(self.editAdminId)+'&timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业管理员管理> 8 企业管理员删除,管理员账号"adminCTest"
    def interface_AdminDel(self):
        module = u'企业管理员管理'
        func = u'企业管理员删除,管理员账号"adminCTest"'
        serial = '8.1'
        funcInfo = serial + '.' + func
        method = 'DELETE'
        url = 'http://' + self.serverIP + '/company/companyAdminDel.do?id='+str(self.editAdminId)
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormDelete(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 1 企业密码修改界面的获取
    def interface_getPasswordEditPage(self):
        module = u'企业密码修改'
        func = u'企业密码修改界面的获取'
        serial = '1.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage.do?timeStamp='+str(getTimestamp())
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 2.1 企业密码修改,新密码为空
    def interface_editPasswordCheck_false_1(self):
        module = u'企业密码修改'
        func = u'新密码的验证,新密码为空'
        serial = '2.1'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage_companyAdminPasswordEdit.do'
        data = {"oldPassword": "123456","passwd": "","confirmPassword":""}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 2.2 企业密码修改,新旧密码一致
    def interface_editPasswordCheck_false_2(self):
        module = u'企业密码修改'
        func = u'企业密码修改,新旧密码一致'
        serial = '2.2'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage_companyAdminPasswordEdit.do'
        data = {"oldPassword": "123456","passwd": "123456","confirmPassword":"123456"}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 2.3 企业密码修改,新密码两次不一致
    def interface_editPasswordCheck_false_3(self):
        module = u'企业密码修改'
        func = u'企业密码修改,新密码两次不一致'
        serial = '2.3'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage_companyAdminPasswordEdit.do'
        data = {"oldPassword": "123456", "passwd": "111111", "confirmPassword": ""}
        expectResult = 0

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 2.4 正常的企业密码修改,旧密码"123456",新密码"111111"
    def interface_editPasswordCheck_true_1(self):
        module = u'企业密码修改'
        func = u'2.4 正常的企业密码修改,旧密码"123456",新密码"111111"'
        serial = '2.4'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage_companyAdminPasswordEdit.do'
        data = {"oldPassword": "123456", "passwd": "111111", "confirmPassword": "111111"}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 企业密码修改> 2.5 正常的企业密码修改,旧密码"111111",新密码"123456"
    def interface_editPasswordCheck_true_2(self):
        module = u'企业密码修改'
        func = u'正常的企业密码修改,旧密码"111111",新密码"123456"'
        serial = '2.5'
        funcInfo = serial + '.' + func
        method = 'POST'
        url = 'http://' + self.serverIP + '/company/companyAdminPasswordEditPage_companyAdminPasswordEdit.do'
        data = {"oldPassword": "111111", "passwd": "12456", "confirmPassword": "123456"}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_FormPost(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

    # 退出> 1.退出登录
    def interface_loginOut(self):
        module = u'退出'
        func = u'退出登录'
        serial = '1.1'
        funcInfo = serial + '.' + func
        method = 'GET'
        url = 'http://' + self.serverIP + '/company/logout.do'
        data = {}
        expectResult = 100

        self.startTime = time.time()
        response = self.assertEqual(PyUnit_PageGet(url, data), expectResult)
        self.endTime = time.time()
        self.useTime = self.endTime - self.startTime
        if response["status"] == 1:
            self.test_success += 1
            self.outputPass(module, funcInfo, serial, method, url, data, expectResult, response["content"])
        else:
            self.test_failed += 1
            self.outputFail(module, funcInfo, serial, method, url, data, expectResult, response["content"])
            self.cpu["data"].testResultAppend(module, func, u'验证' + func + u'接口是否正常', u'网络正常',
                                              u'向服务器发起' + func + u'的请求', u'能收到到' + func + u'的预期反馈',
                                              u'没收到' + func + u'的反馈或反馈内容与预期不一致', u'缺陷', u'紧急', self.test_version,
                                              u'范训山', u'Linyy')

#if __name__ == "__main__":
#    suite = unittest.TestSuite()
#    runner = unittest.TextTestRunner()
#    runner.run(suite)

